<?php
$Set_Title		= $config_nc->Support;
$RowAll			= $support_class->GetByAll();
?>
<div class="dataTables">
	<div class="dataTables_bar fl">
    	<h5 class="title dib"><?php echo $Set_Title;?></h5>
        <div class="dropdown fr">
            <a class="dropdown-toggle db" data-toggle="dropdown" href="#"><i class="icon_cog dib"></i><?php echo $config_nc->Menu;?><i class="caret dib"></i></a>
            <ul class="dropdown-menu">
                <li><a href="<?php echo $WEB_DOMAIN.'/'.$WEB_ADMIN.'/index.php?u1=one-support';?>"><?php echo $config_nc->Add;?></a></li>
            </ul><!--end dropdown-menu-->
        </div><!_-end dropdown-->
    </div><!--end dataTables_bar-->
    <div id="example_wrapper" class="dataTables_wrapper" role="grid">
    	<div id="example_length" class="dataTables_length"></div>
        <div class="dataTables_filter"></div>    
        <table cellpadding="0" cellspacing="0" border="0" class="display">
            <thead>
                <tr>
                    <th><?php echo $config_nc->STT;?></th>
                    <th><?php echo $support_nc->Type;?></th> 
                    <th><?php echo $support_nc->Name;?></th>  
                    <th><?php echo $config_nc->status;?></th>
                    <th> </th>
                </tr>
            </thead>        
            <?php if(is_array($RowAll)){?>
            <tbody>
            <?php 
                    $count = count($RowAll); 
                    for($i=0;$i<$count;$i++){                    
            ?>
                <tr class="gradeA <?php if($i%2==1){echo 'odd';}else{echo 'event';}?>">
                    <td><?php echo $i+1;?></td>
                    <td class="center">
						<?php 
						if($RowAll[$i]['type']==1){
							echo 'Yahoo';
						}else if($RowAll[$i]['type']==2){
							echo 'Skype';
						}else if($RowAll[$i]['type']==3){
							echo $support_nc->Type3;
						}
						?> 
                    </td>
                    <td class="center"><?php echo $RowAll[$i]['name'];?> </td>
                    <td class="center">
                        <?php 
                            if($RowAll[$i]['status']==0){
                                echo $config_nc->status_2;
                            }else{
                                echo $config_nc->status_1;
                            }
                        ?>
                    </td>  
                    <td class="center">
                        <a href="<?php echo $WEB_DOMAIN.'/'.$WEB_ADMIN.'/index.php?u1=one-support&u2='.$RowAll[$i]['id']; ?>"><?php echo $config_nc->View;?></a>
                        &nbsp;&nbsp;&nbsp;
                        <a href="javascript:;" onclick="Del('<?php echo $config_nc->Sure;?>','<?php echo $WEB_DOMAIN.'/'.$WEB_ADMIN.'/index.php?u1=_support&u2=del&u3='.$RowAll[$i]['id'];?>');"><?php echo $config_nc->Del;?></a>
                     </td>
                </tr>
            <?php } ?>
            </tbody>
            <?php } ?>             
        </table>
	</div>    
</div><!--end dataTables-->